import cv2
 
# 读取图片
image = cv2.imread('/image/duanzao_success.png')
 
# 转换为灰度图
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
 
# 使用SURF算法进行特征点检测
surf = cv2.SIFT.create()
keypoints, descriptors = surf.detectAndCompute(gray, None)
 
# 绘制特征点
output = cv2.drawKeypoints(image, keypoints, None)
print(output)
# 显示图片
cv2.imshow('Feature Points', output)
cv2.waitKey(0)
cv2.destroyAllWindows()

